package io.gitee.hechenl.datamultitrans.controller;

import io.gitee.hechenl.datamultitrans.service.IDataOriginService;
import io.gitee.hechenl.datamultitrans.service.IDataTransService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/http")
@RestController
public class HttpTestController {

    @Autowired
    private IDataOriginService dataOriginService;
    @Autowired
    private IDataTransService dataTransService;

    @PostMapping("/trans")
    public void trans() {
        dataTransService.httpPost(() -> dataOriginService.getTemperature());
    }
}
